REM 安装maven的路径
SET maven_install_path=C:\environment\maven_3_8_8\apache-maven-3.8.8

REM    ECHO %myVar%
REM 设置系统默认的maven变量配置
setx -m M2_HOME "%maven_install_path%\bin" &pause

setx -m MAVEN_HOME "%maven_install_path%" &pause
REM 设置maven的环境变量
REM setx PATH "%PATH%;%MAVEN_HOME%\bin" /M
echo 设置maven的环境变量成功
pause